<?php
/* ------------------WAMP Co., Ltd----------------- */
/*     Kien Thuc Kinh Te - kienthuckinhte.com     */
/*     MAIN CSS - WAMP Developed                  */
/*     Email: minhnguyen@wampvn.com               */
/* ------------------------------------------------ */

// no direct access
defined('_JEXEC') or die('Restricted access');

/**
 * This is a file to add template specific chrome to module rendering.  To use it you would
 * set the style attribute for the given module(s) include in your template to use the style
 * for each given modChrome function.
 *
 * eg.  To render a module mod_test in the sliders style, you would use the following include:
 * <jdoc:include type="module" name="test" style="slider" />
 *
 * This gives template designers ultimate control over how modules are rendered.
 *
 * NOTICE: All chrome wrapping methods should be named: modChrome_{STYLE} and take the same
 * two arguments.
 */
/*
 * Module chrome that allows for rounded corners by wrapping in nested div tags
 */
function modChrome_intro_home($module, &$params, &$attribs) {
    if ($module->content) {
        if ($params->get('moduleclass_sfx') == 'overview') {
            ?>

            <div class="right_mod">
                <a href="<?php echo $params->get('linkto'); ?>">
                    <?php echo $module->content; ?>
                </a>
            </div>
        <?php } elseif ($params->get('moduleclass_sfx') == 'content') { ?>
            <div class="right_mod">
                <div class="right_mod_content">
                    <?php echo $module->content; ?>
                </div>
                <div class="link fright top_25">
                    <a href="<?php echo $params->get('linkto') ?>"><?php echo JText::_('READ MORE...'); ?></a>
                </div>
                <div class="map top_70">
                    <img class="png" src="<?php echo JURI::base() ?>images/map.png" />
                </div>
            </div>
        <?php } else { ?>
            <div class="right_mod">
                <?php echo $module->content; ?>
            </div>
            <?php
        } /// END IF $params->get('moduleclass_sfx')=='modbanner'
    } /// END IF $module->content
}

function modChrome_footer_detail($module, &$params, &$attribs) {
    $moduleclass = $params->get('moduleclass_sfx');
    if ($module->content) {
        ?>
            <div class="<?php if($moduleclass == 'block_one' || $moduleclass == 'block_two'){ echo 'grid_6';} else { echo 'grid_5';}; ?> block <?php echo $moduleclass; ?>">
                <div class="prow">
                    <label><?php echo $params->get('label'); ?></label>
                    <?php echo $module->content; ?>
                </div>
            </div><!-- end block_one -->
        <?php
    } /// END IF $module->content
}


function modChrome_modRight($module, &$params, &$attribs){ 
    if($module->showtitle!=0){
        ?>
            <h2 class="mod_<?php echo $module->id; ?>"><span><?php echo $module->title; ?></span></h2>
        <?php
    }
    ?>
    
    <div class="detail">
    	<?php echo $module->content; ?>
    </div>
<?php }
/*
function modChrome_modSlideCatalog($module, &$params, &$attribs){ 
    if($module->showtitle!=0){
        ?>
            <h2 class="mod_<?php echo $module->id; ?>">
                <a class="caption" href="images/catalog/hv.html" title="Hung vuong category" onclick="window.open('images/catalog/hv.html','Catalog','width=900,height=600,left='+(screen.availWidth/2-450)+',top='+(screen.availHeight/2-300)+'');return false;"><span><?php echo $module->title; ?></span></a>
            </h2>
            
            <div class="detail">
                <?php echo $module->content; ?>
            </div>
        <?php
    }
    ?>

<?php }
 * 
 */

function modChrome_modSaleInfo($module, &$params, &$attribs){
    if(strip_tags($module->content)){
    if($module->showtitle!=0){
        ?>
            <h2 class="sale_info_title"><?php echo $module->title; ?></h2>
        <?php
    }
    ?>

    <?php echo $module->content; ?>
    <div class="clearfix"></div>
    
 <?php  }} ?>